<?php

namespace adibilis\adminBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

use Symfony\Component\Validator\Constraints as Assert;


/**
 * Activite
 *
 * @ORM\Table("activite")
 * @ORM\Entity(repositoryClass="adibilis\adminBundle\Entity\ActiviteRepository")
 */
class Activite
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;


    /**
     * @var string
     *
     * @ORM\Column(name="reference", type="string")
     */
    private $reference;



    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    private $name;

    /**
     * @var text
     *
     * @ORM\Column(name="description", type="text")
     * @Assert\MinLength(2)
     */
    private $description;



    /**
     * @var string
     *
     * @ORM\Column(name="address", type="string", length=255)
     */
    private $address;



    /**
    * @ORM\ManyToOne(targetEntity="adibilis\adminBundle\Entity\Locality")
    * @ORM\JoinColumn(nullable=false)
    */
    private $locality;




    /**
    * @ORM\ManyToMany(targetEntity="adibilis\adminBundle\Entity\Category", cascade={"persist"})
    */
    private $categories;



    /**
    * @ORM\ManyToMany(targetEntity="adibilis\adminBundle\Entity\Criteria", cascade={"persist"})
    */
    private $criterias;


    /**
     * @var string
     *
     * @ORM\Column(name="telephone", type="string", length=255)
     */
    private $telephone;




    /**
     * @var string
     *
     * @ORM\Column(name="email", type="string", length=255)
     */
    private $email;


    /**
     * @var boolean
     *
     * @ORM\Column(name="active", type="boolean")
     */
    private $active; 

  /**
     * @var string
     *
     * @ORM\Column(name="latitude", type="string", length=255)
     */
    private $latitude;

    /**
     * @var string
     *
     * @ORM\Column(name="longitude", type="string", length=255)
     */
    private $longitude;




    /**
     * @ORM\OneToOne(targetEntity="adibilis\adminBundle\Entity\Image", cascade={"persist"})
     * @ORM\JoinColumn(nullable=true)
     */
    private $image;



    /**
     * @ORM\OneToMany(targetEntity="adibilis\adminBundle\Entity\Comment", mappedBy="activite", cascade={"remove"})
     * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
    */
  private $comments;



      /**
     * @var text
     *
     * @ORM\Column(name="descriptionen", type="text")
     */
    private $descriptionen;


      /**
     * @var text
     *
     * @ORM\Column(name="descriptionde", type="text")
     */
    private $descriptionde;




    /**
   * @param adibilis\adminBundle\Entity\Comment $comment
   * @return Article
   */
  public function addComment(\adibilis\adminBundle\Entity\Comment $comment)
  {
    $this->comments[] = $comment;
    return $this;
  }
 
  /**
   * @param adibilis\adminBundle\Entity\Comment $comment
   */
  public function removeComment(\adibilis\adminBundle\Entity\Comment $comment)
  {
    $this->comments->removeElement($comment);
  }
 
  /**
   * @return Doctrine\Common\Collections\Collection
   */
  public function getComment()
  {
    return $this->comments;
  }



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }



    /**
     * Set description
     *
     * @param string $description
     * @return Activite
     */
    public function setDescription($description)
    {
        $this->description = $description;
    
        return $this;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription()
    {
        return $this->description;
    }



    /**
     * Constructor
     */
    public function __construct()
    {
        $this->categories = new \Doctrine\Common\Collections\ArrayCollection();
        $this->comments = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Set reference
     *
     * @param integer $reference
     * @return Activite
     */
    public function setReference($reference)
    {
        $this->reference = $reference;
    
        return $this;
    }

    /**
     * Get reference
     *
     * @return integer 
     */
    public function getReference()
    {
        return $this->reference;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Activite
     */
    public function setName($name)
    {
        $this->name = $name;
    
        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }



    /**
     * Set address
     *
     * @param string $address
     * @return Activite
     */
    public function setAddress($address)
    {
        $this->address = $address;
    
        return $this;
    }

    /**
     * Get address
     *
     * @return string 
     */
    public function getAddress()
    {
        return $this->address;
    }


    /**
     * Set telephone
     *
     * @param string $telephone
     * @return Activite
     */
    public function setTelephone($telephone)
    {
        $this->telephone = $telephone;
    
        return $this;
    }

    /**
     * Get telephone
     *
     * @return string 
     */
    public function getTelephone()
    {
        return $this->telephone;
    }

    /**
     * Set email
     *
     * @param string $email
     * @return Activite
     */
    public function setEmail($email)
    {
        $this->email = $email;
    
        return $this;
    }

    /**
     * Get email
     *
     * @return string 
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * Set locality
     *
     * @param \adibilis\adminBundle\Entity\Locality $locality
     * @return Activite
     */
    public function setLocality(\adibilis\adminBundle\Entity\Locality $locality)
    {
        $this->locality = $locality;
    
        return $this;
    }

    /**
     * Get locality
     *
     * @return \adibilis\adminBundle\Entity\Locality 
     */
    public function getLocality()
    {
        return $this->locality;
    }

    /**
     * Add categories
     *
     * @param \adibilis\adminBundle\Entity\Category $categories
     * @return Activite
     */
    public function addCategorie(\adibilis\adminBundle\Entity\Category $categories)
    {
        $this->categories[] = $categories;
    
        return $this;
    }

    /**
     * Remove categories
     *
     * @param \adibilis\adminBundle\Entity\Category $categories
     */
    public function removeCategorie(\adibilis\adminBundle\Entity\Category $categories)
    {
        $this->categories->removeElement($categories);
    }

    /**
     * Get categories
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getCategories()
    {
        return $this->categories;
    }




    /**
     * Get criterias
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getCriterias()
    {
        return $this->criterias;
    }



    /**
     * Add categories
     *
     * @param \adibilis\adminBundle\Entity\Category $categories
     * @return Activite
     */
    public function addCriteria(\adibilis\adminBundle\Entity\Criteria $criterias)
    {
        $this->criterias[] = $criterias;
    
        return $this;
    }

    /**
     * Remove categories
     *
     * @param \adibilis\adminBundle\Entity\Category $categories
     */
    public function removeCriteria(\adibilis\adminBundle\Entity\Criteria $criterias)
    {
        $this->criterias->removeElement($criterias);
    }






    /**
     * Set active
     *
     * @param boolean $active
     * @return Activite
     */
    public function setActive($active)
    {
        $this->active = $active;
    
        return $this;
    }

    /**
     * Get active
     *
     * @return boolean 
     */
    public function getActive()
    {
        return $this->active;
    }

    /**
     * Set latitude
     *
     * @param string $latitude
     * @return Activite
     */
    public function setLatitude($latitude)
    {
        $this->latitude = $latitude;
    
        return $this;
    }

    /**
     * Get latitude
     *
     * @return string 
     */
    public function getLatitude()
    {
        return $this->latitude;
    }

    /**
     * Set longitude
     *
     * @param string $longitude
     * @return Activite
     */
    public function setLongitude($longitude)
    {
        $this->longitude = $longitude;
    
        return $this;
    }

    /**
     * Get longitude
     *
     * @return string 
     */
    public function getLongitude()
    {
        return $this->longitude;
    }

    /**
     * Set image
     *
     * @param \adibilis\adminBundle\Entity\Image $image
     * @return Activite
     */
    public function setImage(\adibilis\adminBundle\Entity\Image $image = null)
    {
        $this->image = $image;
    
        return $this;
    }

    /**
     * Get image
     *
     * @return \adibilis\adminBundle\Entity\Image 
     */
    public function getImage()
    {
        return $this->image;
    }

    /**
     * Set descriptionen
     *
     * @param string $descriptionen
     * @return Activite
     */
    public function setDescriptionen($descriptionen)
    {
        $this->descriptionen = $descriptionen;
    
        return $this;
    }

    /**
     * Get descriptionen
     *
     * @return string 
     */
    public function getDescriptionen()
    {
        return $this->descriptionen;
    }

    /**
     * Set descriptionde
     *
     * @param string $descriptionde
     * @return Activite
     */
    public function setDescriptionde($descriptionde)
    {
        $this->descriptionde = $descriptionde;
    
        return $this;
    }

    /**
     * Get descriptionde
     *
     * @return string 
     */
    public function getDescriptionde()
    {
        return $this->descriptionde;
    }

    /**
     * Get comments
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getComments()
    {
        return $this->comments;
    }
}